using System;
using FytSoa.Common.Utils;
using System.ComponentModel.DataAnnotations;
using FytSoa.Common.Enum;
using FytSoa.Domain.Erp;
using SqlSugar;

namespace FytSoa.Application.Erp;

/// <summary>
/// erp_流程审批记录
/// </summary>
public class ErpFlowAuditLogDto : AppEntity
{
    /// <summary>
    /// 使用编号例如合同等
    /// </summary>
    [Required]
    public long UseId { get; set; }
    
    /// <summary>
    /// 流程编号
    /// </summary>
    public long FlowId { get; set; }

    /// <summary>
    /// 流程使用编号
    /// </summary>
    [Required]
    public long FlowUseId { get; set; }

    /// <summary>
    /// 流程审批人
    /// </summary>
    [Required]
    public long PersonId { get; set; }

    /// <summary>
    /// 审批人姓名
    /// </summary>
    public string PersonName { get; set; }
    
    /// <summary>
    /// 审批人机构
    /// </summary>
    public string PersonOrg { get; set; }

    /// <summary>
    /// 状态
    /// </summary>
    [Required]
    public FlowAuditEnum Status { get; set; } = 0;

    /// <summary>
    /// 类型标识
    /// </summary>
    public FlowTypeEnum Type { get; set; } = 0;
    
    /// <summary>
    /// 类型标识
    /// </summary>
    public string TypeName { get; set; }

    /// <summary>
    /// 标题
    /// </summary>
    public string Title { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    [StringLength(100)]
    public string Remark { get; set; }

    /// <summary>
    /// 驳回原因
    /// </summary>
    public List<ErpFlowAuditLog.ErpFlowAuditReject> Reject { get; set; } = new();

    /// <summary>
    /// 创建人
    /// </summary>
    public string CreateUser { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    [Required]
    public DateTime CreateTime { get; set; } = DateTime.Now;


}